<%--
  Created by IntelliJ IDEA.
  User: yuhaiping
  Date: 2019/9/12
  Time: 11:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.javafish.webhello.*"%>
<%@ page import="com.javafish.DataHandler" %>
<%@ page import="com.javafish.webhello.Bean.Media" %>
<%@ page import="java.util.List" %>
<html>
<head>
    <title>Java Webapp</title>
</head>
<body>
    查询结果：<br/><br/>

<%
    DataHandler dataHandler = new DataHandler();
    List<Media> medisList = dataHandler.queryallmedia();
    out.println("<table border='1px'> ");
    for(Media i: medisList){
        out.println("<tr>");
        out.println("<td>" + i.media_id + "</td><td>"+ i.status + "</td><td>"+ i.type + "</td><td>" +  i.created_time + "</td>" );
        out.println("</tr>");
    }
    out.println("</table>");
%>
    <br/><br/>
    插入数据：<br/>
    <form action="index" method="get">
        <br/>
        <input type="text" name="ID" value="59">
        <input type="text" name="Type" value="1">
        <input type="text" name="Status" value="hello">
        <input type="text" name="Date" value="Thu Sep 19 13:00:00 CST 2019">
        <input type="submit" value="Insert">
    </form>
</body>
</html>
